import time

from playwright.sync_api import sync_playwright
with sync_playwright() as p:
    browser = p.chromium.launch(headless=False)
    page = browser.new_page()
    page.goto('https://126.com/')
    aa = page.frame_locator('//html/body/div[3]/div[3]/div[1]/div/div[3]/div[1]/div[2]/iframe')
    aa.locator('//html/body/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/input').fill('gw17518836160')
    aa.locator('//html/body/div[2]/div[2]/div[2]/form/div/div[3]/div[2]/input[2]').fill('GeWei17518836160')
    time.sleep(2)
    aa.locator('a[id="dologin"]').click()
    time.sleep(5)
    page.locator('//html/body/div[1]/nav/div[1]/ul/li[2]/span[2]').click()
    page.locator('//html/body/div[2]/div[1]/div[2]/div[1]/section/header/div[1]/div[1]/div/div[2]/div/input').fill('gw17518836160@126.com')
    page.fill('//html/body/div[2]/div[1]/div[2]/div[1]/section/header/div[2]/div[1]/div/div/input','你好')

    bb = page.frame_locator('//html/body/div[2]/div[1]/div[2]/div[1]/section/section/div/div[1]/div[1]/div[2]/div/iframe')
    bb.locator('//html/body/div').fill('6666666666')
    page.locator('//html/body/div[2]/div[1]/div[2]/header/div/div[1]/div/span[2]').click()




















